<%@ page language="java" contentType="text/html;charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<!--[if IE 8]> <html lang="zh" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]> <html lang="zh" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html lang="en" class="no-js">
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
    <jsp:include page="../common/common.jsp"/>
    <link href="${path}/assets/plugins/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css"/>
    <link href="${path}/assets/plugins/ligerUI/skins/Gray/css/all.css" rel="stylesheet"/>
</head>
<body class="page-header-fixed page-sidebar-fixed">
<jsp:include page="../common/header.jsp"/>
<div class="clearfix"></div>
<div class="page-container">
    <div class="page-sidebar-wrapper">
        <jsp:include page="../common/menu.jsp"/>
    </div>
    <div class="page-content-wrapper">
        <div class="page-content">
            <div class="row">
                <div class="col-md-12">
                    <div class="portlet box purple">
                        <div class="portlet-title">
                            <div class="caption"><i class="fa fa-file-text-o"></i>菜单管理</div>
                            <div class="tools">
                                <div class="actions">
                                    <button type="button" id="btnA" class="btn green" onclick="show(true)">新增</button>
                                    <button type="button" id="btnB" class="btn blue" onclick="oper(1)">启用</button>
                                    <button type="button" id="btnC" class="btn yellow" onclick="oper(0)">停用</button>
                                    <button type="button" id="btnDel" class="btn red" onclick="del()"><i
                                            class="fa fa-trash-o"></i> 删除
                                    </button>
                                </div>
                            </div>
                        </div>
                        <div class="portlet-body">
                            <div id="maingrid"></div>
                            <input type="hidden" id="menuid"/>

                            <div id="ajax-modal" class="modal fade bs-modal-lg" tabindex="-1" role="dialog"
                                 data-keyboard="false">
                                <div class="modal-dialog modal-lg">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal"></button>
                                            <h4 class="modal-title">详细信息</h4>
                                        </div>
                                        <div class="modal-body">
                                            <div class="row">
                                                <div class="col-md-8">
                                                    <div class="portlet box purple ">
                                                        <div class="portlet-title">
                                                            <div class="caption">
                                                                <i class="fa fa-reorder"></i> 基本信息
                                                            </div>
                                                        </div>
                                                        <div class="portlet-body form">
                                                            <form id="formDetail" class="form-horizontal">
                                                                <div class="form-body">
                                                                    <div class="form-group">
                                                                        <label class="col-md-3 control-label">上级菜单：</label>

                                                                        <div class="col-md-8">
                                                                            <input type="hidden" id="pid" name="pid"/>
                                                                            <input type="text" id="pmenuName"
                                                                                   name="pmenuName" readonly="readonly"
                                                                                   class="form-control"/>
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-md-3 control-label">菜单名称：</label>

                                                                        <div class="col-md-8">
                                                                            <input type="hidden" name="id" id="id">
                                                                            <input type="text" id="menuname"
                                                                                   name="menuname"
                                                                                   class="form-control"/>
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-md-3 control-label">菜单URL：</label>

                                                                        <div class="col-md-8">
                                                                            <input type="text" id="url" name="url"
                                                                                   class="form-control"/>
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-md-3 control-label">菜单顺序：</label>

                                                                        <div class="col-md-8">
                                                                            <input type="text" id="sort" name="sort"
                                                                                   class="form-control"/>
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-md-3 control-label">菜单图片：</label>

                                                                        <div class="col-md-8">
                                                                            <input type="hidden" name="menuimg"
                                                                                   id="menuimg"/>
                                                                            <i class=""></i>&nbsp;&nbsp;&nbsp;&nbsp;
                                                                            <button class="btn blue" data-toggle="modal"
                                                                                    href="#stack2"><i
                                                                                    class="fa fa-edit"></i></button>
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-md-3 control-label">菜单状态：</label>

                                                                        <div class="col-md-8 radio-list">
                                                                            <table>
                                                                                <tr>
                                                                                    <td>
                                                                                        <label class="radio-inline">
                                                                                            <input type="radio"
                                                                                                   name="isactive"
                                                                                                   value="0"/>
                                                                                        </label>
                                                                                    </td>
                                                                                    <td>无效</td>
                                                                                    <td>
                                                                                        <label class="radio-inline">
                                                                                            <input type="radio"
                                                                                                   name="isactive"
                                                                                                   value="1"
                                                                                                   checked="checked"/>
                                                                                        </label>
                                                                                    </td>
                                                                                    <td>有效</td>
                                                                                </tr>
                                                                            </table>
                                                                        </div>
                                                                    </div>
                                                                    <div class="form-group">
                                                                        <label class="col-md-3 control-label">备注：</label>

                                                                        <div class="col-md-8">
                                                                            <input type="text" id="remark" name="remark"
                                                                                   class="form-control"/>
                                                                        </div>
                                                                    </div>

                                                                </div>
                                                            </form>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-4">
                                                    <div class="portlet green box">
                                                        <div class="portlet-title">
                                                            <div class="caption">
                                                                <i class="fa fa-cogs"></i> 上级菜单
                                                            </div>
                                                        </div>
                                                        <div class="portlet-body">
                                                            <div id="menuTree"></div>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="modal-footer">
                                            <button type="button" class="btn default" data-dismiss="modal">关闭</button>
                                            <button type="button" class="btn green" onclick="save()">保存</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div id="stack2" class="modal fade" tabindex="-1" role="dialog" data-keyboard="false">
                                <div class="modal-dialog modal-lg">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <button type="button" class="close" data-dismiss="modal"
                                                    aria-hidden="true"></button>
                                            <h4 class="modal-title">选择图标</h4>
                                        </div>
                                        <div class="modal-body" id="icons">
                                            <%@include file="icons.html" %>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<jsp:include page="../common/footer.jsp"/>

<!-- END PAGE LEVEL SCRIPTS -->

<!-- END JAVASCRIPTS -->
<script src="${path}/assets/plugins/bootstrap-modal/js/bootstrap-modalmanager.js" type="text/javascript"></script>
<script src="${path}/assets/plugins/bootstrap-modal/js/bootstrap-modal.js" type="text/javascript"></script>
<script src="${path}/assets/plugins/ligerUI/js/core/base.js" type="text/javascript"></script>
<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerResizable.js" type="text/javascript"></script>
<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerDrag.js"></script>
<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerDialog.js"></script>
<script src="${path}/assets/plugins/ligerUI/js/plugins/ligerTree.js"></script>
<script type="text/javascript" src="${path}/platform/js/menu.js"></script>
</body>
<!-- END BODY -->
</html>
